<!--
描述：实践环节-新增组件
开发人：fwb
开发日期：2017年8月22日
-->

<template lang="pug">
    kalix-dialog.user-add(bizKey="practiceCourse" ref="kalixBizDialog" v-bind:form-model.sync="formModel" v-bind:targetURL="targetURL" )
        div.el-form(slot="dialogFormSlot")
            div.s-flex
                el-form-item.s-flex_item(label="环节代码" prop="kcdm" v-bind:label-width="labelWidth")
                    el-input(v-model="formModel.kcdm")
                el-form-item.s-flex_item(label="中文名称" prop="zwmc" v-bind:label-width="labelWidth")
                    el-input(v-model="formModel.zwmc")
            div.s-flex
                el-form-item.s-flex_item(label="英文名称" prop="ywmc" v-bind:label-width="labelWidth")
                    el-input(v-model="formModel.ywmc")
                el-form-item.s-flex_item(label="学分" prop="zxf" v-bind:label-width="labelWidth")
                    el-input(v-model="formModel.zxf")
            div.s-flex
                el-form-item.s-flex_item(label="承担单位" prop="cddw"  v-bind:label-width="labelWidth")
                    kalix-tree2(v-model="formModel.cddw" v-bind:treeDataURL="orgURL" v-bind:parentNodeId="orgId")
                el-form-item.s-flex_item(label="环节类别" prop="hjlb"  v-bind:label-width="labelWidth")
                    kalix-dict-select(v-model="formModel.hjlb" appName="admin" dictType="环节类别" )
            div.s-flex
                el-form-item.s-flex_item(label="周数" prop="zxs" v-bind:label-width="labelWidth")
                    el-input(v-model="formModel.zxs")
            div.s-flex
                el-form-item.s-flex_item(label="教学大纲" prop="jxdg" v-bind:label-width="labelWidth")
                    el-input(v-model="formModel.jxdg" type="textarea")
</template>

<script type="text/ecmascript-6">
    import FormModel from './model'
    import {PracticeCourseURL, orgURL, TeachingUnitOrgID} from '../../config.toml'

    export default {
        name: 'PracticeCourseAdd',
        data() {
            return {
                formModel: Object.assign({}, FormModel),
                rules: {
                    //  userId: [{type: 'number', required: true, message: '请输入学生姓名', trigger: 'change'}]
                },
                targetURL: PracticeCourseURL,
                orgURL: orgURL,
                orgId: TeachingUnitOrgID,
                labelWidth: '120px'
            }
        },
        components: {},
        created() {
        },
        methods: {}
    }
</script>

<style scoped lang="stylus">
    .el-form
        padding 30px 70px 30px 20px
</style>
